//<![CDATA[ 	
    var iconPlot = new GIcon();
	iconPlot.infoWindowAnchor = new GPoint(5, 1);

	var customIcons = []; 
	customIcons["All"] = iconPlot; 	
	
	function load(sPop_id) 
	{ 
		if (GBrowserIsCompatible()) 
		{ 
			var map = new GMap2(document.getElementById("map")); 
			map.setCenter(new GLatLng(20, 15), 2); 
			map.setUIToDefault();
			map.setMapType(G_PHYSICAL_MAP);
			alert(sPop_id);			
			GDownloadUrl("ajaxHLAMap.asp?pop_id="+sPop_id, function(data) 
			{ 
				var xml = GXml.parse(data); 
				var markers = xml.documentElement.getElementsByTagName("marker"); 
				for (var i = 0; i < markers.length; i++) 
				{ 					
					var name = markers[i].getAttribute("name"); 
					var address = markers[i].getAttribute("address");
					var type = markers[i].getAttribute("type"); 
					var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng"))); 
					var marker = createMarker(point, name, address, type); 
					map.addOverlay(marker); 
				} 
			});			
		} 
	} 
	function createMarker(point, name, address, type) 
	{ 
		var iLength = 0;
		var sPop_id = "";
		var iSample = 0;
		var sName = "";
		var iImgWidth = 0;
		var iImgHeight = 0;
		var iShaWidth = 0;
		var iShaHeight = 0;
		
		sPop_id = name.substring(1,8);
		iSample = parseFloat(name.substring(12,20));
		sName = name.substring(20);

		sImage = 'images/icon_kir.gif';

		if(iSample > 5000)
		{
			iImgWidth = 16;
			iImgHeight = 16;
			iShaWidth = 16;
			iShaHeight = 16;
		}
		else
		{
			if(iSample > 1000)
			{
				iImgWidth = 14;
				iImgHeight = 14;
				iShaWidth = 14;
				iShaHeight = 14;
			}
			else
			{
				if(iSample > 500)
				{
					iImgWidth = 12;
					iImgHeight = 12;
					iShaWidth = 12;
					iShaHeight = 12;
				}
				else
				{
					iImgWidth = 10;
					iImgHeight = 10;
					iShaWidth = 10;
					iShaHeight = 10;
				}
			}
		}
		iconPlot.image = sImage;
		//iconPlot.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
		iconPlot.iconSize = new GSize(iImgWidth, iImgHeight); 
		//iconPlot.shadowSize = new GSize(iShaWidth, iShaHeight); 
		iconPlot.iconAnchor = new GPoint(6, 20);
		
		var marker = new GMarker(point, customIcons["All"]);
		var html = "<br /><a href='pop6001c.asp?pop_id=" + sPop_id + "'>" + sName + "</a></b><font color='black' size='1'><br/>" + address + "</font>";
		GEvent.addListener(marker, 'click', function() { marker.openInfoWindowHtml(html);}); 
		return marker; 
	} 
	//]]> 
